Handle content from a script tag in python